Adds a check if OpenTelemetry instrumentation can be used.#4486
Merged
pmaytak merged 4 commits intopmaytak/azfunc-ds-6from Jan 9, 2024
Merged
Adds a check if OpenTelemetry instrumentation can be used.#4486pmaytak merged 4 commits intopmaytak/azfunc-ds-6from
pmaytak merged 4 commits intopmaytak/azfunc-ds-6from
Conversation
bgavrilMS
reviewed
Jan 4, 2024
src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/AbstractPlatformProxy.cs
Outdated
Show resolved
Hide resolved
gladjohn
approved these changes
Jan 6, 2024
src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/AbstractPlatformProxy.cs
Show resolved
Hide resolved
neha-bhargava
approved these changes
Jan 8, 2024
Contributor
neha-bhargava
left a comment
There was a problem hiding this comment.
I would recommend using this solution rather than #4487 since the problem will still occur in case anyone uses otel exporter version >=1.4 and the workarounds for the versions will still be needed.
Contributor
Author
I'll combine the two PRs actually. Yes, if client app uses OpenTelemetry 1.4+, that'll still break but it won't be because of MSAL. The main issue here is client apps that don't use any telemetry should work and not break because of MSAL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4456. An alternative to #4487 solution.
Changes proposed in this request
Catching error when instantiating Open Telemetry fails (means it's not available in that environment) and using null telemetry implementation instead.
Testing
Manual.
This solution seems to be better than #4487, since there may be a need to bump DiagnosticsSource version if we need to use the newer APIs.